extends Node

#addPartner("3")
func addPartner(params):
	var careerId = params[0]
	
	var weaponData = CustomClasses.WeaponData.new()
	weaponData.config = ConfigClasses.WeaponConfig.configsDict["2"]
	weaponData.lv = 1
	GlobalData.addWeapon(weaponData)
	
	var weaponData2 = CustomClasses.WeaponData.new()
	weaponData2.config = ConfigClasses.WeaponConfig.configsDict["3"]
	weaponData2.lv = 1
	GlobalData.addWeapon(weaponData2)
	
	var weaponData3 = CustomClasses.WeaponData.new()
	weaponData3.config = ConfigClasses.WeaponConfig.configsDict["4"]
	weaponData3.lv = 1
	GlobalData.addWeapon(weaponData3)
	
	var headEquipmentData = CustomClasses.EquipmentData.new()
	headEquipmentData.config = ConfigClasses.EquipmentConfig.configsDict["2"] 
	GlobalData.addEquipment(headEquipmentData)
	
	var bodyEquipmentData = CustomClasses.EquipmentData.new()
	bodyEquipmentData.config = ConfigClasses.EquipmentConfig.configsDict["1"] 
	GlobalData.addEquipment(bodyEquipmentData)
	
	var legEquipmentData = CustomClasses.EquipmentData.new()
	legEquipmentData.config = ConfigClasses.EquipmentConfig.configsDict["3"] 
	GlobalData.addEquipment(legEquipmentData)
	
	var handEquipmentData = CustomClasses.EquipmentData.new()
	handEquipmentData.config = ConfigClasses.EquipmentConfig.configsDict["4"] 
	GlobalData.addEquipment(handEquipmentData)
	
	var partnerData = CustomClasses.EntityData.new()
	partnerData.newBorn(ConfigClasses.CareerConfig.configsDict[careerId])	
	partnerData.spriteFrames = "SampleSpriteFrames02"
	partnerData.uiHeadIcon = "book_01a.png"
	partnerData.weaponsData.append(weaponData)
	partnerData.equipmentsData.append(headEquipmentData)
	partnerData.equipmentsDataDict[Consts.EQUIPMENT_LOC_HEAD] = headEquipmentData
	partnerData.equipmentsData.append(handEquipmentData)
	partnerData.equipmentsDataDict[Consts.EQUIPMENT_LOC_HAND] = handEquipmentData
	
	var partnerData02 = CustomClasses.EntityData.new()
	partnerData02.newBorn(ConfigClasses.CareerConfig.configsDict[careerId])
	partnerData02.spriteFrames = "SampleSpriteFrames03"
	partnerData02.uiHeadIcon = "armor_01a.png"
	partnerData02.weaponsData.append(weaponData2)
	partnerData02.equipmentsData.append(headEquipmentData)
	partnerData02.equipmentsDataDict[Consts.EQUIPMENT_LOC_HEAD] = headEquipmentData
	partnerData02.equipmentsData.append(legEquipmentData)
	partnerData02.equipmentsDataDict[Consts.EQUIPMENT_LOC_LEG] = legEquipmentData
	
	var partnerData03 = CustomClasses.EntityData.new()
	partnerData03.newBorn(ConfigClasses.CareerConfig.configsDict[careerId])
	partnerData03.spriteFrames = "SampleSpriteFrames04"
	partnerData03.uiHeadIcon = "bow_01a.png"
	partnerData03.weaponsData.append(weaponData3)
	partnerData03.equipmentsData.append(bodyEquipmentData)
	partnerData03.equipmentsDataDict[Consts.EQUIPMENT_LOC_BODY] = bodyEquipmentData
	partnerData03.equipmentsData.append(handEquipmentData)
	partnerData03.equipmentsDataDict[Consts.EQUIPMENT_LOC_HAND] = handEquipmentData
	
	var partnerData04 = CustomClasses.EntityData.new()
	partnerData04.newBorn(ConfigClasses.CareerConfig.configsDict[careerId])
	partnerData04.spriteFrames = "SampleSpriteFrames05"
	partnerData04.uiHeadIcon = "shield_01b.png"
	partnerData04.equipmentsData.append(headEquipmentData)
	partnerData04.equipmentsData.append(bodyEquipmentData)
	partnerData04.equipmentsData.append(legEquipmentData)
	partnerData04.equipmentsData.append(handEquipmentData)
	partnerData04.equipmentsDataDict[Consts.EQUIPMENT_LOC_HEAD] = headEquipmentData
	partnerData04.equipmentsDataDict[Consts.EQUIPMENT_LOC_BODY] = bodyEquipmentData
	partnerData04.equipmentsDataDict[Consts.EQUIPMENT_LOC_LEG] = legEquipmentData
	partnerData04.equipmentsDataDict[Consts.EQUIPMENT_LOC_HAND] = handEquipmentData
	
	GlobalData.partnersData.append(partnerData)
	GlobalData.partnersData.append(partnerData02)
	GlobalData.partnersData.append(partnerData03)
	GlobalData.partnersData.append(partnerData04)
	
	Global.initPartnerView(Global.getChildNodeByName(get_tree().current_scene, "Player"))
	
	
